package com.cn.lyl.lawyer.service.impl;

import com.cn.lyl.lawyer.dao.LeavingMapper;
import com.cn.lyl.lawyer.model.entity.LeavingModel;
import com.cn.lyl.lawyer.service.LeavingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeavingServiceImpl implements LeavingService {
    @Autowired
    LeavingMapper leavingMapper;

    @Override
    public void add(LeavingModel leavingModel) {
        leavingMapper.add(leavingModel);
    }

    @Override
    public void delete(Integer id) {
        leavingMapper.delete(id);
    }

    @Override
    public List<LeavingModel> findAll(LeavingModel leavingModel) {
        return leavingMapper.findAll(leavingModel);
    }

    @Override
    public LeavingModel findInfo(Integer id) {
        return leavingMapper.findById(id);
    }

    @Override
    public int getCount(LeavingModel leavingModel) {
        return leavingMapper.countFindAll(leavingModel);
    }
}
